package member

import (
	"lao-a/helper"
	"lao-a/models/model"
)

// GetInviteList 获取邀请记录
func (m *DAO) GetInviteList(memId, memType string) ([]model.TaInvite, error) {
	var list []model.TaInvite

	if err := m.db.Where("inviter_id=?", memId).
		And("identy_type=?", memType).
		And("status=?", STATUS_NORMAL).
		Desc("invite_date").Find(&list);
		err != nil {
			return nil, helper.LogError("获取邀请记录失败", err)
	}

	return list, nil;
}